package router

import (
	"haodayizhi/controll"
	middleware "haodayizhi/middle_ware"

	"github.com/gin-gonic/gin"
)

func User(router *gin.RouterGroup) {
	// 需要鉴权
	router.GET("/info", middleware.AuthMiddleware(), controll.UserInfoHandler)
	// 修改用户信息
	router.POST("/update", middleware.AuthMiddleware(), controll.ChangeUserInfoHandler)
	// 上传头像
	router.POST("/upload", middleware.AuthMiddleware(), controll.UploadAvatar)
	// 获取用户列表
	router.GET("/list", middleware.AuthMiddleware(), controll.GetUserList)
	// search send email id username list
	router.GET("/search", middleware.AuthMiddleware(), controll.GetUserListInField)

}
